﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Imagenator.Forms
{
	partial class SendCrashReportBox : ArgusLib.Controls.BaseForm
	{
		public SendCrashReportBox()
		{
			InitializeComponent();
		}

		private void bYes_Click(object sender, EventArgs e)
		{
			this.DialogResult = System.Windows.Forms.DialogResult.Yes;
		}

		private void bNo_Click(object sender, EventArgs e)
		{
			this.DialogResult = System.Windows.Forms.DialogResult.No;
		}

		private void llFile_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			if (File.Exists(this.llFile.Text) == true)
				System.Diagnostics.Process.Start("explorer.exe", "/select,\""+this.llFile.Text+'"');
		}

		public static DialogResult Show(string file)
		{
			SendCrashReportBox box = new SendCrashReportBox();
			box.llFile.Text = file;
			box.ShowDialog();
			return box.DialogResult;
		}
	}
}
